#if !defined(DAEMON_SUB_PROCESS_H)
#define DAEMON_SUB_PROCESS_H
#include <unistd.h>
//子进程结构体
typedef struct{
    pid_t pid;//子进程的pid
    char * sub_cmd;//子进程命令
    int failed_count; //失败次数
}SubProcess;

//初始化子进程
SubProcess * daemon_sub_process_init(char * sub_cmd);

/**
 * 检查并启动子进程
 */
int daemon_sub_process_check_start(SubProcess * sub_process);
#endif

